package org.wukongcrm.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

/**
    * 线索表
    */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "leads")
public class Leads implements Serializable {
    /**
     * 线索编号
     */
    @TableId(value = "leads_no", type = IdType.INPUT)
    private Integer leadsNo;

    /**
     * 1已转化，0未转化
     */
    @TableField(value = "is_transform")
    private Integer isTransform;

    /**
     * 跟进状态 0未跟进 1已跟进
     */
    @TableField(value = "is_followup")
    private Integer isFollowup;

    /**
     * 线索名称，也就是客户公司名称
     */
    @TableField(value = "leads_name")
    private String leadsName;

    /**
     * 客户编号
     */
    @TableField(value = "customer_id")
    private Integer customerId;

    /**
     * 线索手机号
     */
    @TableField(value = "phone")
    private String phone;

    /**
     * 电话号码
     */
    @TableField(value = "telephone")
    private String telephone;

    /**
     * 邮箱地址
     */
    @TableField(value = "email")
    private String email;

    /**
     * 地址
     */
    @TableField(value = "address")
    private String address;

    /**
     * 下次联系时间
     */
    @TableField(value = "next_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date nextTime;

    /**
     * 客户级别
     */
    @TableField(value = "customer_level")
    private Integer customerLevel;

    /**
     * 客户标签
     */
    @TableField(value = "customer_label")
    private Integer customerLabel;

    /**
     * 线索来源
     */
    @TableField(value = "leads_source")
    private Integer leadsSource;

    /**
     * 客户行业
     */
    @TableField(value = "customer_field")
    private Integer customerField;

    /**
     * 备注
     */
    @TableField(value = "remarks")
    private String remarks;

    /**
     * 创建人编号
     */
    @TableField(value = "create_user_id")
    private Integer createUserId;

    /**
     * 负责人编号
     */
    @TableField(value = "owner_user_id")
    private Integer ownerUserId;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private Date updateTime;

    /**
     * 最后一次跟进时间
     */
    @TableField(value = "last_time")
    private Date lastTime;

    /**
     * 最后一次跟进内容
     */
    @TableField(value = "last_content")
    private String lastContent;

    /**
     * 1 分配 2 领取
     */
    @TableField(value = "is_receive")
    private Integer isReceive;

    /**
     * 放入线索池时间
     */
    @TableField(value = "pool_time")
    private Date poolTime;

    /**
     * 放入线索池理由
     */
    @TableField(value = "put_pool_reason")
    private String putPoolReason;

    /**
     * 领取理由
     */
    @TableField(value = "collect_reason")
    private String collectReason;

    /**
     * 进入线索池前负责人id
     */
    @TableField(value = "pre_owner_user_id")
    private Integer preOwnerUserId;

    private static final long serialVersionUID = 1L;
}